<template>
	<view class="guide" >
		<view class="guide-item" @click.stop="onDetail(item.id)" v-for="(item,index) in list" :key="index">
			<view class="guide-item-header" >
				 <u-image
				    :showLoading="true"
				    :src="item.avatar"
					radius="10"
				    width="100px"
				    height="120px"
				    @click.native.stop="onOther(item.id)"
				  ></u-image>
				<!-- <u-avatar size="60" :src="item.avatar"  @click.native.stop="onOther(item.id)"></u-avatar> -->
				<view class="guide-item-header-attr">
					<view class="guide-item-header-attr-name">
						{{item.name}}
						<text class="guide-item-header-attr-name-real">已实名</text>
					</view>
					<view class="guide-item-header-attr-sex">
						<u-icon v-if="!item.sex" name="woman" color="#EA0B8B" size="15"></u-icon>
						<u-icon v-else name="man" color="#00A6EE" size="15"></u-icon>
						{{item.sex==0?"女":"男"}}·{{item.age}}岁·IP{{item.ip}}
						<u-rate style="margin-left: 20rpx;" active-color="#FED942" readonly size="12" count="1" gutter="0" inactive-color="#EEA200" ></u-rate>
						{{item.score}}分&nbsp;&nbsp;{{item.list}}+单
					</view>
					<view class="guide-item-header-attr-score">
						入驻平台2年，累计服务500+人次
					</view>
					<view class="guide-item-character">
						{{item.character}}
					</view>
					<view class="guide-item-experience">
						{{item.experience}}
					</view>
				</view>
				<!-- <view class="guide-item-header-btn">
					<u-button size="mini" color="#1196DB"  text="导游详情"></u-button>
				</view> -->
			</view>
			
		</view>
		<u-loadmore :status="loadStatus" />
	</view>
</template>

<script>
	export default {
		props:{
			guideList:{ //	当前选中的index
				type:Array,
				default:()=>[]
			},
			current:{
				type:Number,
				default:0
			},
			loadStatus: {
			    type: String,
			    default: 'loadmore'
			}
		},
		watch:{
			guideList(newValue,oldValue){
				this.list = newValue
			},
		},
		data() {
			return {
				list:this.guideList
			}
		},
		methods: {
			onOther(id){
				uni.navigateTo({
					url: '/pages/user/others/others?userId='+id,
				});
			},
			onDetail(id){
				uni.navigateTo({
					url: '/pages/guide/guide?guideId='+id,
				});
			}
		}
	}
</script>

<style lang="scss">
.guide{
	display: flex;
	flex-direction: column;
	padding: 20rpx;
	background-size: 100% 100%;
	&-item{
		margin-bottom: 30rpx;
		padding: 20rpx;
		background-color: rgba(255,255,255,.7);
		border-radius: 20rpx;
		letter-spacing: 3rpx;
		font-size: 24rpx;
		line-height: 35rpx;
		box-shadow: 0rpx 5rpx 5rpx #F8F8F8;
		&-header{
			display: flex;
			align-items: center;
			&-attr{
				flex: 1;
				margin-left: 20rpx;
				display: flex;
				height: 110px;
				flex-direction: column;
				justify-content: space-between;
				&-name{
					display: flex;
					align-items: flex-end;
					font-weight: bold;
					font-size: 34rpx;
					&-real{
						font-size: 16rpx;
						color: #FFFFFF;
						padding: 0 10rpx;
						background: #727272;
						font-weight: 500;
						margin: 0 10rpx;
						border-radius: 10rpx;
						height: 30rpx;
						line-height: 30rpx;
					}
					.image{
						width: 40rpx;
					}
				}
				&-sex{
					// flex: 1;
					display: flex;
					letter-spacing: 3rpx;
				}
				&-score{
					display: flex;
					align-items: center;
					color: #727272;
				}
				
			}
			&-btn{
				width:100rpx;
			}
			
		}
		
	}
}
</style>
